package com.yaoli.niuke;

import java.util.ArrayList;
import java.util.Scanner;

/**
 * Created by siemens on 6/1/2017.
 */
public class _022_Test {
    public static void main(String [] args){
//        Scanner input = new Scanner(System.in);
//        int a = input.nextInt();
//        int nums [] = new int[a];
//        for(int i = 0 ; i < nums.length ; i++){
//            nums[i] = input.nextInt();
//        }
        // 10 ,3 ,10, 5, 7
        // 3 2 4 7

        int nums [] ={272,128,114,898,288,994,641,784,956,762,683,292,470,252,279,830,999,665,106,176,742,85,468,26,171,544,834,682,560,134,134,692,399,663,415,515,424,973,21,343,559,474,135,241,547,137,729,103,902,739,359,87,359,790,209,136,490,851,63,650,946,934,384,320,12,852,682,726,704,847,262,139,471,733,861,108,101,316,930,430,715,571,218,639,537,938,299,310,385,788,418,883,945,849,332,979,241,38,804,362,249,577,20,636,826,118,840,246,704,383,206,705,838,204,272,631,99,447,847,176,216,735,426,511,895,132,10,260,640,772,518,803,412,139,555,712,687,502,966,509,967,599,634,890,803,988,31,950,186,682,619,979,49,641,111,903,815,538,826,206,633,781,648,54,989,855,695,754,158,855,183,360,277,323,44,755,451,743,869,98,396,16,443,65,838,131,70,590,801,521,406,947,438,789,248,16,400,267,370,529,253,897,523,19,20,396,692,855,945,231,246,972,777,633,330,320,266,445,424,86,210,489,958,708,462,159,263,376,798,869,123,514,239,236,168,741,343,393,764,361,383,868,983,789,974,701,655,979,339,891,215,304,332,862,495,258,136,383,74,570,824,844,533,687,763,580,15,454,88,200,644,981,702};

        int max = 2;
        for(int i = 1 ; i < nums.length -1 ; i++){
            if((nums[i] < nums[i - 1] && nums[i + 1] > nums[i - 1]) || (nums[i] > nums[i - 1 ] && nums[i + 1] > nums[i - 1])){
                max = Math.max(max,help(nums,i));
            }
        }

        System.out.println(max);

    }

    public static int help(int [] nums,int j ){
        int count = 0;
        for(int i = j - 1 ; i > 0 ; i--){
            if(nums[i] > nums[i-1]){
                count++;
            }else{
                break;
            }
        }

        for(int i = j + 1; i < nums.length - 1 ; i++){
            if(nums[i] < nums[i+1]){
                count++;
            }else{
                break;
            }
        }

        return count + 3;
    }
//    public static void main(String [] args){
//        ArrayList<Integer> list = new ArrayList<Integer>();
//
////        Scanner input = new Scanner(System.in);
////        int num = input.nextInt();
////
////        if(num == 1){
////            System.out.println(num);
////        }
////        int [] a = new int[num];
////
////        for(int i = 0 ; i < a.length ; i++){
////            a[i] = input.nextInt();
////        }
//        int num = 6;
//        int a [] ={272,128,114,898,288,994,641,784,956,762,683,292,470,252,279,830,999,665,106,176,742,85,468,26,171,544,834,682,560,134,134,692,399,663,415,515,424,973,21,343,559,474,135,241,547,137,729,103,902,739,359,87,359,790,209,136,490,851,63,650,946,934,384,320,12,852,682,726,704,847,262,139,471,733,861,108,101,316,930,430,715,571,218,639,537,938,299,310,385,788,418,883,945,849,332,979,241,38,804,362,249,577,20,636,826,118,840,246,704,383,206,705,838,204,272,631,99,447,847,176,216,735,426,511,895,132,10,260,640,772,518,803,412,139,555,712,687,502,966,509,967,599,634,890,803,988,31,950,186,682,619,979,49,641,111,903,815,538,826,206,633,781,648,54,989,855,695,754,158,855,183,360,277,323,44,755,451,743,869,98,396,16,443,65,838,131,70,590,801,521,406,947,438,789,248,16,400,267,370,529,253,897,523,19,20,396,692,855,945,231,246,972,777,633,330,320,266,445,424,86,210,489,958,708,462,159,263,376,798,869,123,514,239,236,168,741,343,393,764,361,383,868,983,789,974,701,655,979,339,891,215,304,332,862,495,258,136,383,74,570,824,844,533,687,763,580,15,454,88,200,644,981,702};
//
//        // 10 11 12 13 14 10 11 12
//        int count = 0;
//
//        for(int i = 0 ; i < a.length - 1; i++){
//            count++;
//
//            if(a[i] > a[i+1] || a[i] == a[i+1]){
//                list.add(count);
//                if(count == 6){
//                    System.out.println(i);
//                }
//                count = 0;
//            }
//
//        }
//
//
//        if(a[a.length - 2] < a[a.length - 1]){
//            count++;
//            list.add(count);
//        }else{
//            list.add(count);
//            list.add(1);
//        }
//        int max = Integer.MIN_VALUE;
//        for(int i = 1 ; i < list.size() ; i++){
//            max = Math.max(max,list.get(i)+list.get(i-1));
//        }
//
//
//        System.out.println(max);
//    }
//
//    public void get(){
//        int a [] ={272,128,114,898,288,994,641,784,956,762,683,292,470,252,279,830,999,665,106,176,742,85,468,26,171,544,834,682,560,134,134,692,399,663,415,515,424,973,21,343,559,474,135,241,547,137,729,103,902,739,359,87,359,790,209,136,490,851,63,650,946,934,384,320,12,852,682,726,704,847,262,139,471,733,861,108,101,316,930,430,715,571,218,639,537,938,299,310,385,788,418,883,945,849,332,979,241,38,804,362,249,577,20,636,826,118,840,246,704,383,206,705,838,204,272,631,99,447,847,176,216,735,426,511,895,132,10,260,640,772,518,803,412,139,555,712,687,502,966,509,967,599,634,890,803,988,31,950,186,682,619,979,49,641,111,903,815,538,826,206,633,781,648,54,989,855,695,754,158,855,183,360,277,323,44,755,451,743,869,98,396,16,443,65,838,131,70,590,801,521,406,947,438,789,248,16,400,267,370,529,253,897,523,19,20,396,692,855,945,231,246,972,777,633,330,320,266,445,424,86,210,489,958,708,462,159,263,376,798,869,123,514,239,236,168,741,343,393,764,361,383,868,983,789,974,701,655,979,339,891,215,304,332,862,495,258,136,383,74,570,824,844,533,687,763,580,15,454,88,200,644,981,702};
//
//        for (int i = 1; i < a.length - 1; i++) {
//            if(a[i] < a[i - 1] && a[i + 1] > a [i - 1]){
//
//            }
//        }
//    }
}
